﻿#include "FITKLoadConstraintSEAShell.h"
#include "FITKAcousticsAbstractSpectra.h"
#include "FITK_Kernel/FITKCore/FITKDataRepo.h"

namespace Acoustics
{
    FITKLoadConstraintSEAShell::FITKLoadConstraintSEAShell()
    {
        //构造
    }

    FITKLoadConstraintSEAShell::~FITKLoadConstraintSEAShell()
    {
        //析构
    }

    FITKAcousticsAbstractLoad::AcousticsLoadType FITKLoadConstraintSEAShell::getAcousticsLoadType()
    {
        //获取载荷类型
        return FITKAcousticsAbstractLoad::AcousticsLoadType::ConstraintSEAShell;
    }

    bool FITKLoadConstraintSEAShell::copy(FITKAbstractDataObject* obj)
    {
        //拷贝数据
        FITKLoadConstraintSEAShell* oldObj = dynamic_cast<FITKLoadConstraintSEAShell*>(obj);
        if (!oldObj) return false;
        _enabledState = oldObj->_enabledState;
        _notes = oldObj->_notes;
        _connectObjID = oldObj->_connectObjID;
        _flexureSpectraID = oldObj->_flexureSpectraID;
        _extensionSpectraID = oldObj->_extensionSpectraID;
        _shearSpectraID = oldObj->_shearSpectraID;
        this->Core::FITKAbstractNDataObject::copy(obj);
        return true;
    }

    int FITKLoadConstraintSEAShell::getFlexureSpectraID()
    {
        //获取弯曲波频谱ID
        return _flexureSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadConstraintSEAShell::getFlexureSpectra()
    {
        //获取弯曲波频谱对象
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_flexureSpectraID);
    }

    void FITKLoadConstraintSEAShell::setFlexureSpectraID(int id)
    {
        //设置弯曲波ID
        _flexureSpectraID = id;
    }

    int FITKLoadConstraintSEAShell::getExtensionSpectraID()
    {
        //获取拉伸波频谱ID
        return _extensionSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadConstraintSEAShell::getExtensionSpectra()
    {
        //获取拉伸波频谱对象
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_extensionSpectraID);
    }

    void FITKLoadConstraintSEAShell::setExtensionSpectraID(int id)
    {
        //设置拉伸波ID
        _extensionSpectraID = id;
    }

    int FITKLoadConstraintSEAShell::getShearSpectraID()
    {
        //获取剪切波频谱ID
        return _shearSpectraID;
    }

    FITKAcousticsAbstractSpectra * FITKLoadConstraintSEAShell::getShearSpectra()
    {
        //获取剪切波频谱对象
        return FITKDATAREPO->getTDataByID<FITKAcousticsAbstractSpectra>(_shearSpectraID);
    }

    void FITKLoadConstraintSEAShell::setShearSpectraID(int id)
    {
        //设置剪切波频谱ID
        _shearSpectraID = id;
    }
}